const mongoose = require("mongoose");
const userSchema = mongoose.Schema({
    username: String,
    pwd: {
        type:String,
        select:false, //对用户表的所有查询结果中都不会包含pwd字段
    },
    avatar:{
        type:String,
        required:false
    },
    roles:Array
})
const userModel = mongoose.model("user",userSchema)
module.exports = userModel